package com.thb.pay.api.sys;

import com.thb.pay.vo.req.SysRolePermissionReq;
import com.thb.pay.vo.resp.SysPermissionVo;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Slf4j
@Component
public class SysPermissionServiceApiFallbackFactory implements FallbackFactory<SysPermissionServiceApi> {


    @Override
    public SysPermissionServiceApi create(Throwable throwable) {
        return new SysPermissionServiceApi() {

            @Override
            public List<SysPermissionVo> findPermissionListByRoleId(@RequestParam("roleId") Long roleId) {
                return null;
            }

            @Override
            public void saveRolePermissions(@RequestBody SysRolePermissionReq rolePermissionReq) {

            }
        };
    }
}